package com.geek.water.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author yangwenqi
 * @decs TODO
 * @date 2025/7/25
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("work_order")
@ApiModel(description = "工单表")
public class WorkOrder implements Serializable {
    @ApiModelProperty("主键，自增工单ID")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("关联设备ID")
    @TableField("device_id")
    private Long deviceId;

    @ApiModelProperty("关联站点ID")
    @TableField("site_id")
    private Long siteId;

    @ApiModelProperty("工单类型")
    @TableField("type")
    private String type;

    @ApiModelProperty("工单状态")
    @TableField("status")
    private String status;

    @ApiModelProperty("创建人用户ID")
    @TableField("creator_id")
    private Long creatorId;

    @ApiModelProperty("指派人用户ID")
    @TableField("assignee_id")
    private Long assigneeId;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createdAt;

    @ApiModelProperty("完成时间")
    @TableField("finished_at")
    private LocalDateTime finishedAt;

    @ApiModelProperty("用户评价")
    @TableField("evaluation")
    private String evaluation;

    @ApiModelProperty("工单描述")
    @TableField("description")
    private String description;
}
